import request from '@/utils/request';

export const getNoticeList = (noticeData) => {
    return request.post('/notice/list',  noticeData );
};

export const addNotice = (notice) => {
    return request.post('/notice/add', notice);
};
export const addaddadminNotice = (notice) => {
    return request.post('/notice/addadmin', notice);
};
// export const getNoticePageList = (pageNum, pageSize, noticeData) => {
//     return request.post('/notice/Pagelist', {
//         pageNum,
//         pageSize,
//         ...noticeData
//     });
// };
export const getNoticePageList = (pageNum, pageSize, noticeData) => {
    return request.get('/notice/Pagelist', {
        params: {
            pageNum,
            pageSize,
            ...noticeData // 将搜索条件展开为查询参数
        }
    });
};
export const updateNotice = (notice) => {
    return request.post('/notice/update', notice);
};

export const deleteNotice = (id) => {
    return request.delete(`/notice/delete/${id}`);
};

